`timescale 1ns / 1ps

module CMP(
    input [31:0] CA,
    input [31:0] CB,
    input [2:0] Cop,
    output CO
    );

    assign CO =  (Cop == 3'b000)? (CA == CB) :
                 (Cop == 3'b001)? (CA != CB) :
                 (Cop == 3'b010)? ($signed(CA) <= $signed(32'b0)) :
                 (Cop == 3'b011)? ($signed(CA) > $signed(32'b0)) :
                 (Cop == 3'b100)? ($signed(CA) < $signed(32'b0)) :
                 (Cop == 3'b101)? ($signed(CA) >= $signed(32'b0)) :
                 (Cop == 3'b110)? (0) :
                                  (0);

endmodule
